package com.hanbang.chu_xing_gao_zhao.view_dynamic;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.InputFilter.LengthFilter;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;

import com.hanbang.chu_xing_gao_zhao.base.BaseActivity;
import com.hanbang.chu_xing_gao_zhao.utils.ScreenUtils;
import com.hanbang.cxgz_2.R;

public class DynamicManageHome extends BaseActivity {
    private LinearLayout ll;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dynamic_manage_home);
        initView();
        setFirstScreennHeight();
        setOnClickListener();
    }

    /**
     * 初始化view
     */
    private void initView() {
        ll = (LinearLayout) findViewById(R.id.ll);

    }

    /**
     * 设置第一页面的高度
     */
    private void setFirstScreennHeight() {
        // 得到屏幕的高度
        int a = ScreenUtils.getScreenHeight(getApplicationContext());
        // 取控件mGrid当前的布局参数
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) ll.getLayoutParams();
        // 重新设置高度的值
        layoutParams.height = (int) a - 60 - ScreenUtils.getStatusHeight(getApplicationContext());
        // 重新设置布局参数
        ll.setLayoutParams(layoutParams);

    }

    /**
     * 设置点击事件
     */
    private void setOnClickListener() {

    }

    /**
     * @param context
     * @param id
     * @param isVip
     */
    public static void startOwn(Context context, int id, boolean isVip) {
        Intent intent = new Intent(context, DynamicManageHome.class);
        context.startActivity(intent);

    }

    /**
     * 处理监听
     */
    @SuppressWarnings("unused")
    private OnClickListener onClickListener = new OnClickListener() {

        @Override
        public void onClick(View v) {
            switch (v.getId()) {

                default:
                    break;
            }
        }
    };

    @Override
    protected void onResume() {
        setTitleMore(View.VISIBLE, View.GONE, "经理人主页", null, null, null);
        setBackArrows(findViewById(R.id.bar_top_conver_classify_back));

        super.onResume();
    }

    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
    }

    @Override
    protected void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
    }
}
